package MyOop01;

public class Human {
    public static void main(String[] args) {
        //创建对象的语法
        //类名  方法名 = new  类名（）
        People people = new People();

        //使用"."进行一下操作
        //对象名.属性
        people.name = "刘成梦";
        people.age = 23;
        people.weight = 56;

        //对象名.方法()
        //方法可以反复调用
        people.run();
        people.run();

        String food = "苹果";
        people.eat(food );

        String yan = people.buy();
        System.out.println("买回来的是:"+yan);

        String distance = people.exercise(5000);
        System.out.println(distance);
        System.out.println("程序结束");

    }
}
